package com.kakarote.hrm.constant;

/**
 * 招聘过程是否枚举
 */
public enum PositionProcessIsEnum {

    YES(1, "是"),
    NO(0, "否");

    private final Integer value;
    private final String name;

    PositionProcessIsEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(Integer value) {
        if (value == null) {
            return "";
        }
        for (PositionProcessIsEnum positionProcessIs : values()) {
            if (positionProcessIs.getValue().equals(value)) {
                return positionProcessIs.getName();
            }
        }
        return "";
    }
}
